Skip to content

Try to fix Windows CI (GitHub Actions -- vcpkg manifest mode)#518

Merged
stefanseefeld merged 14 commits into
boostorg:developfrom
stephengtuggy:fix/windows-ci
Jun 21, 2026
Merged

Try to fix Windows CI (GitHub Actions -- vcpkg manifest mode)#518
stefanseefeld merged 14 commits into
boostorg:developfrom
stephengtuggy:fix/windows-ci

Conversation

@stephengtuggy

@stephengtuggy stephengtuggy commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #514 (hopefully)

@stephengtuggy stephengtuggy changed the title Create vcpkg.json Try to fix Windows CI (GitHub Actions -- vcpkg manifest mode) Jun 4, 2026
@stephengtuggy stephengtuggy marked this pull request as ready for review June 4, 2026 00:34
@stefanseefeld

Copy link
Copy Markdown
Member

thanks @stephengtuggy for the patch ! It's definitely a step in the right direction, but apparently not yet complete (the build fails).

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

thanks @stephengtuggy for the patch ! It's definitely a step in the right direction, but apparently not yet complete (the build fails).

@stefanseefeld you're welcome. I think I see what the problem is. I neglected to update the include directory passed to the faber commands. That should be fixed now.

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

Nope, still not right. And unfortunately, this may not be trivial to fix. I'm not sure if there is a singular Boost include directory that can be passed to faber. I think it may be more like a different include directory for each Boost component. How to handle this situation?

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

To eliminate a variable, I am going back to the same vcpkg baseline in the manifest file as was used for vcpkgGitCommitId prior to this PR. Let's see if that helps.

Comment thread .github/workflows/test-windows.yml Outdated
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
runVcpkgInstall: true
- name: List directory contents
run: Get-ChildItem "${{ github.workspace }}/vcpkg" -Recurse -Force -File -Filter 'config.hpp'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps if you use -User . to start looking in the local directory instead of $github.workspace/vcpkg ?
Alternatively, I see that the install root can be set via the vcpkgArguments: '--x-manifest-root=${{ github.workspace }}/vcpkg' directive.

@stephengtuggy stephengtuggy Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command simply searches the <github workspace>/vcpkg directory and all subdirectories for a file named config.hpp. It is literally the equivalent of find "${{ github.workspace}}/vcpkg" -iname 'config.hpp' -type f. And it's not finding the file anywhere! I don't understand what is going on here. Why would this file not be present?

I'm not familiar with -User . in conjunction with the Get-ChildItem command. What would that do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the install root can be set using the vcpkgArguments parameter, but I'm not sure it's best practice to do so.

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

It occurs to me that in my other projects that use vcpkg, I generally set the VCPKG_ROOT environment variable explicitly. This might be important. Trying it now.

@stephengtuggy

stephengtuggy commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Well, I can finally see where config.hpp is. It's in directory D:\a\python\python\969f6665-88a2-4c98-938e-ca9259871fec\vcpkg_installed\x64-windows\include\boost. In other words, '${{ github.workspace }}\<GUID>\vcpkg_installed\$VCPKG_DEFAULT_TRIPLET\include' would be the boost include directory setting for faber.

This raises some more questions: why? Where is this setting coming from? And does the GUID stay the same, or does it change every run?

@stefanseefeld

Copy link
Copy Markdown
Member

That's great progress ! But I agree, having to remember and hardcode such paths is cumbersome and fragile, so best to be avoided. So why not replace all that by a manually defined install root (specified vie vcpkgArguments) ?

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

That's great progress ! But I agree, having to remember and hardcode such paths is cumbersome and fragile, so best to be avoided. So why not replace all that by a manually defined install root (specified vie vcpkgArguments) ?

Yes, I guess that makes sense, actually. I was trying to set it using environment variables, but that doesn't seem to be working for some reason. Perhaps something closer to where vcpkg runs is overriding the relevant environment variable.

At any rate, the last run worked! So the GUID seems to stay the same with each run.

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

I don't think --x-manifest-root is the correct vcpkg argument for this purpose, by the way. I believe --x-manifest-root tells vcpkg where to find the manifest file (vcpkg.json), not where to install the packages it installs.

@stephengtuggy

Copy link
Copy Markdown
Contributor Author

Looks like one can tell vcpkg where to install dependencies using the VCPKG_INSTALLED_DIR environment variable. I will try that.


steps:
- uses: actions/checkout@v5
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you are referring to all actions by sha. Is that really necessary ? Why not use a version tag instead ? Wouldn't that be simpler (more readable, easier to maintain, etc.) ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referring to GitHub Actions by SHA is considered a security best practice. See https://docs.github.com/en/actions/reference/security/secure-use?learn=getting_started#using-third-party-actions .

It's not too difficult to maintain if one uses a tool like Dependabot or Renovate[bot] to keep dependencies up to date, including GitHub Actions dependencies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for readability, I do at least include the version tag in a comment. Hopefully that helps at least a little bit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I noticed. Thanks !
Please go ahead and merge this if you are satisfied with the PR. Many thanks again for all your effort on this ! I wouldn't have been able to pull this off on my own, as I haven't developed on & for Windows in a long time.
Your work will unblock a number of other changes that I was hesitant to add while the Windows build was broken, so I'm thrilled to see this being completed.
Cheers !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome! I am satisfied with the PR, but I don't see a Merge button. I probably don't have merge permissions at the moment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense. I suppose only team members have merge (or commit) permission. Let me merge this for now. If you want to contribute in the future, we can consider adding you to the team. Cheers !

@stefanseefeld stefanseefeld merged commit a017f08 into boostorg:develop Jun 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github actions are outdated

2 participants